//
//  ViewController.m
//  LFCGzipUtillity
//
//  Created by Jarvis on 2024/8/7.
//

#import "ViewController.h"
#import "LFCGzipUtillity.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    NSDictionary *json = @{@"name": @"Bob"};
    NSData *data = [NSJSONSerialization dataWithJSONObject:json options:0 error:NULL];
    
    // gzip加密
    NSData *gzip_data = [LFCGzipUtillity gzipData:data];
    // gzip解密
    NSData *ungzip_data = [LFCGzipUtillity uncompressZippedData:gzip_data];
    
    NSDictionary *result = [NSJSONSerialization JSONObjectWithData:ungzip_data options:0 error:NULL];
    NSLog(@"result: %@", result);
}


@end
